<?php


namespace app\common\cachemodel;


class VipTask
{
    /**
     * 获取会员中心 任务列表
     */
    public function getVipTask()
    {
        $task = config('vip_task');
        $sortArr = [];
        foreach ($task as $v)
        {
            if ($v['is_show'] == true)
            {
                $sortArr[$v['id']] = $v['sort'];
            }
        }

        asort($sortArr);

        $data = [];
        foreach ($sortArr as $key => $sort)
        {
            $data[] = $task[$key];
        }

        return $data;
    }
}
